home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Tools / Win95 Secrets / SETUP.Z / DESCRIPT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-19  |  1.4 KB  |  58 lines

  1. //==================================
  2. // PHYS - Matt Pietrek 1995
  3. // FILE: DESCRIPT.H
  4. //==================================
  5.  
  6. #ifndef __DESCRIPT_H
  7. #define __DESCRIPT_H
  8.  
  9. #pragma pack(1)
  10.  
  11. typedef struct
  12. {
  13.     unsigned short  limit_0_15;
  14.     unsigned short  base_0_15;
  15.     unsigned char   base_16_23;
  16.  
  17.     unsigned int    accessed    : 1;
  18.     unsigned int    readable    : 1;
  19.     unsigned int    conforming  : 1;
  20.     unsigned int    code_data   : 1;
  21.     unsigned int    app_system  : 1;
  22.     unsigned int    dpl         : 2;
  23.     unsigned int    present     : 1;
  24.  
  25.     unsigned int    limit_16_19 : 4;
  26.     unsigned int    unused      : 1;
  27.     unsigned int    always_0    : 1;
  28.     unsigned int    seg_16_32   : 1;
  29.     unsigned int    granularity : 1;
  30.  
  31.     unsigned char   base_24_31;
  32. } CODE_SEG_DESCRIPTOR;
  33.  
  34. typedef struct
  35. {
  36.     unsigned short  offset_0_15;
  37.     unsigned short  selector;
  38.  
  39.     unsigned int    param_count : 4;
  40.     unsigned int    some_bits   : 4;
  41.  
  42.     unsigned int    type        : 4;
  43.     unsigned int    app_system  : 1;
  44.     unsigned int    dpl         : 2;
  45.     unsigned int    present     : 1;
  46.  
  47.     unsigned short  offset_16_31;
  48. } CALLGATE_DESCRIPTOR;
  49.  
  50. unsigned short GetLDTAlias(void);
  51.  
  52. typedef void (_far _pascal * GENERIC_PROC)(void);
  53.  
  54. GENERIC_PROC CreateCallgate(void far * func_address, unsigned params);
  55. void FreeCallgate( GENERIC_PROC callgate_ptr );
  56.  
  57. #endif
  58.